<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>GLFW Readme File</title>
</head>

<body>

<h1>GLFW 2.7.2 Windows binary distribution</h1>

<ol>
 <li><a href="#intro">Introduction</a></li>
 <li><a href="#using">Using GLFW</a></li>
 <li><a href="#changelog">Version history</a></li>
 <li><a href="#structure">Directory structure of the GLFW distribution</a></li>
 <li><a href="#contact">Contacting the project</a></li>
 <li><a href="#credits">Acknowledgements</a></li>
</ol>

<a name="intro">
<h2>1. Introduction</h2>

<p>Welcome to version 2.7.2 of the GLFW OpenGL framework.  GLFW is a free, open
source, portable framework for OpenGL application development.  In short, it is
a library that provides a powerful API for handling operating system specific
tasks, such as opening an OpenGL window, reading keyboard, mouse, joystick and
time input, creating threads, and more.</p>

<p>GLFW 2.7 is expected to be the last major release of the 2.x series, with
most development now being done on what will become version 3.0.</p>

<p>This release brings support for OpenGL 3.2 on OS X Lion and adds a number of
bug fixes for minor issues in 2.7.1.</p>

<p>Please note that this is the <em>Windows binary only</em> distribution of
GLFW.  It contains static, dynamic and link libraries built with and using the
runtimes of a number of common Windows compilers.  More specifically, it
contains files for the following compilers:</p>

<ul>
  <li>MinGW 4.5.0</li>
  <li>Visual C++ 2008 (debug and release runtimes)</li>
  <li>Visual C++ 2010 (debug and release runtimes)</li>
</ul>
  
<p>For the full source distribition, go to the
<a href="http://www.glfw.org/">project website</a> or to the
<a href="http://sourceforge.net/projects/glfw/">project page</a> on SF.net.</p>

<a name="using">
<h2>2. Using GLFW</h2>

<p>There are two aspects to using GLFW:</p>

<ol>
  <li>How does the GLFW API work</li>
  <li>How to compile programs that use GLFW</li>
</ol>

<p>The first point is covered in the
<a href="docs/UsersGuide.pdf">GLFW Users Guide</a> and the
<a href="docs/Reference.pdf">GLFW Reference Manual</a>, and we suggest that you
read at least the Users Guide, since it's a good introduction to the GLFW
API.</p>

<p>Designing and compiling programs that use GLFW is not very difficult.
A few rules for successfully designing GLFW-based programs are presented
in the following sections.</p>

<h3>2.1 Include the GLFW header file</h3>

<p>In the files of your program where you use OpenGL or GLFW, you should
include the <code>GL/glfw.h</code> header file, i.e.:</p>

<blockquote><code>#include &lt;GL/glfw.h&gt;</code></blockquote>

<p>This defines all the constants, types and function prototypes of the GLFW
API.  It also includes the <code>gl.h</code> and </code>GL/glu.h</code> header
files, and - this is very important - <em>it defines all the necessary
constants and types that are necessary for the OpenGL headers to work on
different platforms</em>.</p>

<p>For example, under Microsoft Windows you are normally required to include
<code>windows.h</code> before you include <code>GL/gl.h</code>.  This would
however make your code dependent on the Windows platform, or at least require
your program to check which platform it is being compiled on.

The GLFW header file takes care of this for you, not by including
<code>windows.h</code>, but rather by itself duplicating the necessary parts of
it.  This way, the namespace won't be cluttered by the entire Windows API.</p>

<p>In other words:
<ul>
  <li>Do <em>not</em> include <code>GL/gl.h</code> or <code>GL/glu.h</code>
      yourself, as GLFW does this for you</li>
  <li>Do <em>not</em> include <code>windows.h</code> unless you actually need
      direct access to the Windows API</li>
  <li>If you <em>do</em> need to include <code>windows.h</code>, do it
      <em>before</em> including <code>GL/glfw.h</code> and the GLFW header will
      detect this.</p>
</ul>

<p>Also note that if you are using an OpenGL extension loading library such as
<a href="http://glew.sourceforge.net/">GLEW</a>, you should include the GLEW
header <em>before</em> the GLFW one.  The GLEW header defines macros that
disable any <code>gl.h</code> that the GLFW header includes and GLEW will work
as expected.</p>



<h3>2.2 Link with the right libraries</h3>

<h4>2.2.1 Windows static library</h4>

<p>If you link with the static version of GLFW, it is also necessary to
link with some system libraries that GLFW uses.</p>

<p>When linking a program under Windows that uses the static version of GLFW,
you must also link with the following libraries: <code>opengl32</code>,
<code>user32</code> and <code>kernel32</code>. Some of these libraries may be
linked with by default by your compiler. In the table below you can see the
minimum required link options for each supported Windows compiler (you may want
to add other libraries as well, such as <code>glu32</code>):</p>

<table border=1>
  <tr>
    <td><b>Compiler</b></td>
    <td><b>Link options</b></td>
  </tr>
  <tr>
    <td>Borland C++ Builder</td>
    <td><code>glfw.lib opengl32.lib</code></td>
  </tr>
  <tr>
    <td>Cygwin</td>
    <td><i>See Unix static library below</i></td>
  </tr>
  <tr>
    <td>LCC-Win32</td>
    <td><code>glfw.lib opengl32.lib</code></td>
  </tr>
  <tr>
    <td>Microsoft Visual C++</td>
    <td><code>glfw.lib opengl32.lib user32.lib</code></td>
  </tr>
  <tr>
    <td>MinGW32</td>
    <td><code>-lglfw -lopengl32</code></td>
  </tr>
  <tr>
    <td>OpenWatcom</td>
    <td><code>glfw.lib opengl32.lib user32.lib</code></td>
  </tr>
</table>


<h4>2.2.2 Windows DLL</h4>

<p>To compile a program that uses the DLL version of GLFW, you need to
define the <code>GLFW_DLL</code> constant. This can either be done with a
compiler switch, typically by adding <code>-DGLFW_DLL</code> to the list of
compiler options. You can also do it by adding the following line to all your
source files <b>before</b> including the GLFW header file:</p>

<blockquote><code>#define GLFW_DLL</code></blockquote>

<p>When linking a program under Windows that uses the DLL version of GLFW,
the only library you need to link with for GLFW to work is <code>glfwdll</code>.
In the table below you can see the minimum required link options for each
supported Windows compiler (you may want to add other libraries as well,
such as <code>opengl32</code> and <code>glu32</code>):</p>

<table border=1>
  <tr>
    <td><b>Compiler</b></td>
    <td><b>Link options</b></td>
  </tr>
  <tr>
    <td>Borland C++ Builder</td>
    <td><code>glfwdll.lib</code></td>
  </tr>
  <tr>
    <td>Cygwin</td>
    <td><code>-lglfwdll</code></td>
  </tr>
  <tr>
    <td>LCC-Win32</td>
    <td><code>glfwdll.lib</code></td>
  </tr>
  <tr>
    <td>Microsoft Visual C++</td>
    <td><code>glfwdll.lib</code></td>
  </tr>
  <tr>
    <td>MinGW32</td>
    <td><code>-lglfwdll</code></td>
  </tr>
  <tr>
    <td>OpenWatcom</td>
    <td><code>glfwdll.lib</code></td>
  </tr>
</table>


<a name="changelog">
<h2>3. Version history</h2>

<h3>v2.7.2</h3>
<ul>
  <li>Added library version check to dynamic linking test</li>
  <li>[Cocoa] Added support for OpenGL 3.2 core profile in 10.7 Lion and above</li>
  <li>[Cocoa] Made relevant <code>CFLAGS</code> overridable</li>
  <li>[Cocoa] Bugfix: The OpenGL framework pointer was not retrieved, making <code>glfwGetProcAddress</code> fail</li>
  <li>[Cocoa] Bugfix: The Cocoa layer was not notified that the application may be multithreaded</li>
</ul>


<a name="structure">
<h2>4. Directory structure of the GLFW distribution</h2>

<p>Here is an overview of the directory structure of the GLFW distribution:

<p>
<table border=0 cellspacing=0>
<tr valign="top"><td width=100><code>docs</code></td><td>GLFW manuals in PDF format</td></tr>
<tr valign="top"><td><code>include</code></td><td>&nbsp;</td></tr>
<tr valign="top"><td><code>&nbsp;&nbsp;&nbsp;GL</code></td><td>The GLFW C/C++ include file</td></tr>
<tr valign="top"><td><code>lib-mingw</code></td><td>Binaries for MinGW</td></tr>
<tr valign="top"><td><code>lib-msvc90</code></td><td>&nbsp;</td></tr>
<tr valign="top"><td><code>&nbsp;&nbsp;&nbsp;debug</code></td><td>Binaries for Visual C++ 2008 debug configuration</td></tr>
<tr valign="top"><td><code>&nbsp;&nbsp;&nbsp;release</code></td><td>Binaries for Visual C++ 2008 release configuration</td></tr>
<tr valign="top"><td><code>lib-msvc100</code></td><td>&nbsp;</td></tr>
<tr valign="top"><td><code>&nbsp;&nbsp;&nbsp;debug</code></td><td>Binaries for Visual C++ 2010 debug configuration</td></tr>
<tr valign="top"><td><code>&nbsp;&nbsp;&nbsp;release</code></td><td>Binaries for Visual C++ 2010 release configuration</td></tr>
</table>


<a name="contact">
<h2>5. Contacting the project</h2>

<p>The official website for GLFW is <a href="http://www.glfw.org/">glfw.org</a>.
It contains the latest version of GLFW, news and other information that is
useful for OpenGL development.</p>

<p>If you have questions related to the use of GLFW, we have a
<a href="https://sourceforge.net/forum/forum.php?forum_id=247562">user's web forum</a>,
and a
<a href="https://lists.sourceforge.net/lists/listinfo/glfw-user">user's mailing list</a>
on SF.net, and the registered IRC channel <code>#glfw</code> on
<a href="http://freenode.net/">Freenode</a>.</p>

<p>If you have a bug to report, a patch to submit or a feature you'd like to
request, please file it in one of the
<a href="http://sourceforge.net/tracker/?group_id=72569">GLFW trackers</a> on SF.net.</p>

Finally, if you're interested in helping out with the development of
GLFW or porting it to your favorite platform, we have a
<a href="https://lists.stacken.kth.se/mailman/listinfo/glfw-dev">developer's mailing list</a>,
or you could join us on <code>#glfw</code>.


<a name="credits">
<h2>6. Acknowledgements</h2>

<p>GLFW exists because people around the world donated their time and lent
their skills.  Special thanks go out to:</p>

<ul>

  <li>Bobyshev Alexander and Martins Mozeiko, for the original proposal of
  an FSAA hint and their work on the Win32 implementation of FSAA</li>

  <li>Keith Bauer, for his invaluable help with porting and maintaining GLFW on
  Mac OS X, and for his many ideas</li>

  <li>Jarrod Davis, for the Delphi port of GLFW</li>

  <li>Olivier Delannoy, for the initial implementation of FSAA support on
  X11, cross-compiling support for MinGW and general extreme usefulness</li>

  <li>Paul R. Deppe, who helped with Cygwin support, and made an
  adaption of <a href="http://plib.sourceforge.net/">PLIB</a>
  so that it can use GLFW (instead of GLUT)</li>

  <li>Jonathan Dummer, for submitting a patch fixing an input bug on Win32 and
  adding logic for the GLFW_ICON resource</li>

  <li>Gerald Franz, who made GLFW compile under IRIX, and supplied patches
  for the X11 keyboard translation routine</li>

  <li>Marcus Geelnard, the original author and long-time maintainer of GLFW,
  without whose brilliant work none of this would have happened</li>

  <li>Stefan Gustavson, for quick and thorough testing of GLFW on many and
  varied operating systems and hardware configurations</li>

  <li>Sylvain Hellegouarch, for support, bug reports and testing</li>

  <li>Alex Holkner, for writing the code from which the Compiz/Intel fix was
  stolen</li>

  <li>Toni Jovanoski, for helping with the MASM32 port of GLFW, and
  supplying the example program and fixed OpenGL and GLU bindings for
  MASM32</li>

  <li>Cameron King, for reporting a hidden cursor mouse bug on X11</li>

  <li>Peter Knut, for his many and detailed reports of difficult to find input
  bugs</li>

  <li>Robin Leffmann, for his work on Mac OS X and other platforms, and his
  invaluable support</li>

  <li>Glenn Lewis, for helping out with support for the D programming
  language</li>

  <li>Tristam MacDonald, for his bug reports and feedback on the Cocoa port</li>

  <li>David Medlock, for doing the initial Lua port</li>

  <li>Kenneth Miller, for his many and detailed bug reports on Win32</li>

  <li>Jeff Molofee, the author of the excellent OpenGL tutorials at <a
  href="http://nehe.gamedev.net/">NeHe Productions</a>.
  Much of the Windows code of GLFW was originally based on Jeff's
  code</li>

  <li>Douglas C. Schmidt and Irfan Pyarali, for their excellent article
  <a href="http://www.cs.wustl.edu/~schmidt/win32-cv-1.html">Strategies for Implementing POSIX Condition Variables on Win32</a></li>

  <li>Sebastian Schuberth, for the OpenWatcom makefiles</li>

  <li>Matt Sealey, for helping with the MorphOS port</li>

  <li>Steve Sexton, for reporting an input bug in the Carbon port</li>

  <li>Dmitri Shuralyov, for support, bug reports and testing</li>

  <li>Daniel Skorupski, for reporting a bug in the Win32 DEF file</li>

  <li>Bradley Smith, for his updates of the D support and his ports of the
  remaining examples to the D language</li>

  <li>Julian Squires, for submitting a patch for a bug in the key repeat logic on X11</li>

  <li>Johannes Stein, for maintaining the Pascal bindings</li>

  <li>Samuli Tuomola, for support, bug reports and testing</li>

  <li>Frank Wille, for helping with the AmigaOS port and making GLFW
  compile under IRIX 5.3</li>

  <li>Santi Zupancic, for support, bug reports and testing</li>

  <li>Lasse Öörni, for submitting patches for the input code of the Win32 and X11 ports</li>

  <li>Дмитри Малышев, for the idea of a GLFW_NO_GLU macro</li>

  <li>blanco, for submitting a patch for a deprecation bug in the Cocoa port</li>

  <li>heromyth, for reporting a bug in the D bindings</li>

  <li>Ozzy @ <a href="http://www.orkysquad.org">Orkysquad</a>,
  for his dedication to GLFW, for debugging my source, and for his
  valuable experience with game development</li>

  <li>Peoro, for reporting a bug in the <code>_NET_WM_PING</code> response</li>

  <li>TTK-Bandit, for submitting a number of input patches adding many missing
  keys to the Win32 and X11 ports</li>

  <li>yuriks, for reporting a bug in Win32 context creation</li>

  <li>All the unmentioned and anonymous contributors in the GLFW community, for
  bug reports, patches, feedback and encouragement</li>

  <li><a href="http://www.opengl.org/">OpenGL.org</a>, and all the people on
  the discussion forums there that have provided help during the development of
  GLFW</li>

</ul>

</body>
</html>
